﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shumei.EFCore.Model
{

    /// <summary>
    /// 课时
    /// </summary>
    public class CourseVideo
    {
        [Key]
        public int Id { get; set; }
        

        /// <summary>
        /// 描述名字
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string DesName { get; set; }

        /// <summary>
        /// 第几个课时
        /// </summary>
        [Required]
        public int No { get; set; }

        /// <summary>
        /// 视频的地址
        /// </summary>
        [Required]
        public string VideoUrl { get; set; }

        /// <summary>
        /// 视频的长度
        /// </summary>
        [Required]
        public int VideoLen { get; set; }

        /// <summary>
        /// 所属课程
        /// </summary>
        public virtual Course Course { get; set; }
    }
}
